#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg2000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message PairString
class PairString:
	def __init__(self):
		self.protoid = 0
		self.infoType = ""
		self.value = ""

	def Marshal(writer):
		writer.setString(self.infoType, 1)
		writer.setString(self.value, 2)

	def Unmarshal( reader):
		self.infoType = reader.getString(1)
		self.value = reader.getString(2)
# message Resp2010
class Resp2010:
	def __init__(self):
		self.protoid = 2010
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = PairString() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Pair16
class Pair16:
	def __init__(self):
		self.protoid = 0
		self.infoType = 0
		self.value = 0

	def Marshal(writer):
		writer.setUint8(self.infoType, 1)
		writer.setUint16(self.value, 2)

	def Unmarshal( reader):
		self.infoType = reader.getUint8(1)
		self.value = reader.getUint16(2)
# message Resp2020
class Resp2020:
	def __init__(self):
		self.protoid = 2020
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Pair16() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Pair32
class Pair32:
	def __init__(self):
		self.protoid = 0
		self.infoType = 0
		self.value = 0

	def Marshal(writer):
		writer.setUint8(self.infoType, 1)
		writer.setUint32(self.value, 2)

	def Unmarshal( reader):
		self.infoType = reader.getUint8(1)
		self.value = reader.getUint32(2)
# message Resp2030
class Resp2030:
	def __init__(self):
		self.protoid = 2030
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Pair32() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Resp2040
class Resp2040:
	def __init__(self):
		self.protoid = 2040
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setUint8(self.value[i], 0)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			self.value.append(reader.getUint8(0))
# message EIChg
class EIChg:
	def __init__(self):
		self.protoid = 0
		self.state = 0
		self.info = EquipInfo()

	def Marshal(writer):
		writer.setUint8(self.state, 1)
		writer.setMessage(2)
		self.info.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.state = reader.getUint8(1)
		reader.getMessage(2)
		self.info.Unmarshal(reader)
		reader.endGetMessage()
# message Resp2050
class Resp2050:
	def __init__(self):
		self.protoid = 2050
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = EIChg() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Resp2060
class Resp2060:
	def __init__(self):
		self.protoid = 2060
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = BenisonStairsInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message Resp2080
class Resp2080:
	def __init__(self):
		self.protoid = 2080
		self.value = []

	def Marshal(writer):
		countvalue = len(self.value)
		writer.setArray(countvalue, 1)
		for i in range(countvalue):
			writer.setMessage(0)
			self.value[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = HeroInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.value.append(msg)
# message GIChg
class GIChg:
	def __init__(self):
		self.protoid = 0
		self.state = 0
		self.info = GoodsInfo()

	def Marshal(writer):
		writer.setUint8(self.state, 1)
		writer.setMessage(2)
		self.info.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.state = reader.getUint8(1)
		reader.getMessage(2)
		self.info.Unmarshal(reader)
		reader.endGetMessage()
# message Resp2090
class Resp2090:
	def __init__(self):
		self.protoid = 2090
		self.arrGoodsInfo = []
		self.removeIds = []
		self.heroInfos = []
		self.removeHeroIds = []
		self.fights = []
		self.removeFights = []
		self.tasks = []
		self.removeTask = []
		self.activitys = []
		self.removeActivity = []
		self.activity7s = []

	def Marshal(writer):
		countarrGoodsInfo = len(self.arrGoodsInfo)
		writer.setArray(countarrGoodsInfo, 1)
		for i in range(countarrGoodsInfo):
			writer.setMessage(0)
			self.arrGoodsInfo[i].Marshal(writer)
			writer.endSetMessage()
		countremoveIds = len(self.removeIds)
		writer.setArray(countremoveIds, 2)
		for i in range(countremoveIds):
			writer.setUint64(self.removeIds[i], 0)
		countheroInfos = len(self.heroInfos)
		writer.setArray(countheroInfos, 3)
		for i in range(countheroInfos):
			writer.setMessage(0)
			self.heroInfos[i].Marshal(writer)
			writer.endSetMessage()
		countremoveHeroIds = len(self.removeHeroIds)
		writer.setArray(countremoveHeroIds, 4)
		for i in range(countremoveHeroIds):
			writer.setUint32(self.removeHeroIds[i], 0)
		countfights = len(self.fights)
		writer.setArray(countfights, 5)
		for i in range(countfights):
			writer.setMessage(0)
			self.fights[i].Marshal(writer)
			writer.endSetMessage()
		countremoveFights = len(self.removeFights)
		writer.setArray(countremoveFights, 6)
		for i in range(countremoveFights):
			writer.setUint32(self.removeFights[i], 0)
		counttasks = len(self.tasks)
		writer.setArray(counttasks, 7)
		for i in range(counttasks):
			writer.setMessage(0)
			self.tasks[i].Marshal(writer)
			writer.endSetMessage()
		countremoveTask = len(self.removeTask)
		writer.setArray(countremoveTask, 8)
		for i in range(countremoveTask):
			writer.setUint32(self.removeTask[i], 0)
		countactivitys = len(self.activitys)
		writer.setArray(countactivitys, 9)
		for i in range(countactivitys):
			writer.setMessage(0)
			self.activitys[i].Marshal(writer)
			writer.endSetMessage()
		countremoveActivity = len(self.removeActivity)
		writer.setArray(countremoveActivity, 10)
		for i in range(countremoveActivity):
			writer.setUint32(self.removeActivity[i], 0)
		countactivity7s = len(self.activity7s)
		writer.setArray(countactivity7s, 11)
		for i in range(countactivity7s):
			writer.setMessage(0)
			self.activity7s[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = GoodsInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrGoodsInfo.append(msg)
		for i in range(reader.getArray(2)):
			self.removeIds.append(reader.getUint64(0))
		for i in range(reader.getArray(3)):
			msg = HeroInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.heroInfos.append(msg)
		for i in range(reader.getArray(4)):
			self.removeHeroIds.append(reader.getUint32(0))
		for i in range(reader.getArray(5)):
			msg = FightPropInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.fights.append(msg)
		for i in range(reader.getArray(6)):
			self.removeFights.append(reader.getUint32(0))
		for i in range(reader.getArray(7)):
			msg = Task() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.tasks.append(msg)
		for i in range(reader.getArray(8)):
			self.removeTask.append(reader.getUint32(0))
		for i in range(reader.getArray(9)):
			msg = Activity() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.activitys.append(msg)
		for i in range(reader.getArray(10)):
			self.removeActivity.append(reader.getUint32(0))
		for i in range(reader.getArray(11)):
			msg = Activity7() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.activity7s.append(msg)
# message Req2091
class Req2091:
	def __init__(self):
		self.protoid = 2091
		self.list = []

	def Marshal(writer):
		countlist = len(self.list)
		writer.setArray(countlist, 1)
		for i in range(countlist):
			writer.setMessage(0)
			self.list[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = GoodsInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.list.append(msg)
# message Resp2091
class Resp2091:
	def __init__(self):
		self.protoid = 2091
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 2)

	def Unmarshal( reader):
		self.status = reader.getUint32(2)
# message Req2092
class Req2092:
	def __init__(self):
		self.protoid = 2092
		self.type = 0
		self.sortL = 0
		self.sortR = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint8(self.type, 1)
		writer.setUint16(self.sortL, 2)
		writer.setUint16(self.sortR, 3)
		writer.setUint32(self.playerId, 4)

	def Unmarshal( reader):
		self.type = reader.getUint8(1)
		self.sortL = reader.getUint16(2)
		self.sortR = reader.getUint16(3)
		self.playerId = reader.getUint32(4)
# message Resp2092
class Resp2092:
	def __init__(self):
		self.protoid = 2092
		self.rankItems = []
		self.level = 0
		self.val = 0
		self.index = 0
		self.playerId = 0
		self.status = 0

	def Marshal(writer):
		countrankItems = len(self.rankItems)
		writer.setArray(countrankItems, 1)
		for i in range(countrankItems):
			writer.setMessage(0)
			self.rankItems[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint16(self.level, 2)
		writer.setInt32(self.val, 3)
		writer.setInt32(self.index, 4)
		writer.setUint32(self.playerId, 5)
		writer.setUint8(self.status, 6)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = RankItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.rankItems.append(msg)
		self.level = reader.getUint16(2)
		self.val = reader.getInt32(3)
		self.index = reader.getInt32(4)
		self.playerId = reader.getUint32(5)
		self.status = reader.getUint8(6)
# message Req2093
class Req2093:
	def __init__(self):
		self.protoid = 2093
		self.type = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint8(self.type, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.type = reader.getUint8(1)
		self.playerId = reader.getUint32(2)
# message Resp2093
class Resp2093:
	def __init__(self):
		self.protoid = 2093
		self.rewardInfos = []
		self.playerId = 0
		self.status = 0

	def Marshal(writer):
		countrewardInfos = len(self.rewardInfos)
		writer.setArray(countrewardInfos, 1)
		for i in range(countrewardInfos):
			writer.setMessage(0)
			self.rewardInfos[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.playerId, 2)
		writer.setUint8(self.status, 3)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = RewardInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.rewardInfos.append(msg)
		self.playerId = reader.getUint32(2)
		self.status = reader.getUint8(3)
# message Req2094
class Req2094:
	def __init__(self):
		self.protoid = 2094
		self.type = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint8(self.type, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.type = reader.getUint8(1)
		self.playerId = reader.getUint32(2)
# message Resp2094
class Resp2094:
	def __init__(self):
		self.protoid = 2094
		self.rewardInfos = []
		self.playerId = 0
		self.status = 0
		self.type = 0

	def Marshal(writer):
		countrewardInfos = len(self.rewardInfos)
		writer.setArray(countrewardInfos, 1)
		for i in range(countrewardInfos):
			writer.setMessage(0)
			self.rewardInfos[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.playerId, 2)
		writer.setUint8(self.status, 3)
		writer.setUint8(self.type, 4)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = RewardInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.rewardInfos.append(msg)
		self.playerId = reader.getUint32(2)
		self.status = reader.getUint8(3)
		self.type = reader.getUint8(4)
# message Req2095
class Req2095:
	def __init__(self):
		self.protoid = 2095
		self.type = 0
		self.playerId = 0
		self.sortL = 0
		self.sortR = 0
		self.op = 0

	def Marshal(writer):
		writer.setUint8(self.type, 1)
		writer.setUint32(self.playerId, 2)
		writer.setUint16(self.sortL, 3)
		writer.setUint16(self.sortR, 4)
		writer.setUint8(self.op, 5)

	def Unmarshal( reader):
		self.type = reader.getUint8(1)
		self.playerId = reader.getUint32(2)
		self.sortL = reader.getUint16(3)
		self.sortR = reader.getUint16(4)
		self.op = reader.getUint8(5)
# message Resp2095
class Resp2095:
	def __init__(self):
		self.protoid = 2095
		self.fightItems = []
		self.selfRank = FightRankItem()
		self.status = 0
		self.op = 0

	def Marshal(writer):
		countfightItems = len(self.fightItems)
		writer.setArray(countfightItems, 1)
		for i in range(countfightItems):
			writer.setMessage(0)
			self.fightItems[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(2)
		self.selfRank.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.status, 3)
		writer.setUint8(self.op, 4)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = FightRankItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.fightItems.append(msg)
		reader.getMessage(2)
		self.selfRank.Unmarshal(reader)
		reader.endGetMessage()
		self.status = reader.getUint32(3)
		self.op = reader.getUint8(4)
# message Req2096
class Req2096:
	def __init__(self):
		self.protoid = 2096
		self.playerId = 0
		self.likePlayerId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.likePlayerId, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.likePlayerId = reader.getUint32(2)
# message Resp2096
class Resp2096:
	def __init__(self):
		self.protoid = 2096
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
# message Req2098
class Req2098:
	def __init__(self):
		self.protoid = 2098
		self.type = 0
		self.playerId = 0
		self.sortL = 0
		self.sortR = 0

	def Marshal(writer):
		writer.setUint8(self.type, 1)
		writer.setUint32(self.playerId, 2)
		writer.setUint16(self.sortL, 3)
		writer.setUint16(self.sortR, 4)

	def Unmarshal( reader):
		self.type = reader.getUint8(1)
		self.playerId = reader.getUint32(2)
		self.sortL = reader.getUint16(3)
		self.sortR = reader.getUint16(4)
# message Resp2098
class Resp2098:
	def __init__(self):
		self.protoid = 2098
		self.fightItems = []
		self.selfRank = GuildRankItem()
		self.status = 0

	def Marshal(writer):
		countfightItems = len(self.fightItems)
		writer.setArray(countfightItems, 1)
		for i in range(countfightItems):
			writer.setMessage(0)
			self.fightItems[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(2)
		self.selfRank.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.status, 3)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = GuildRankItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.fightItems.append(msg)
		reader.getMessage(2)
		self.selfRank.Unmarshal(reader)
		reader.endGetMessage()
		self.status = reader.getUint32(3)
# message Req2100
class Req2100:
	def __init__(self):
		self.protoid = 2100
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
# message Resp2100
class Resp2100:
	def __init__(self):
		self.protoid = 2100
		self.playerId = 0
		self.index = 0
		self.win = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.index, 2)
		writer.setUint32(self.win, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.index = reader.getUint32(2)
		self.win = reader.getUint32(3)
# message Req2101
class Req2101:
	def __init__(self):
		self.protoid = 2101
		self.sortL = 0
		self.sortR = 0
		self.op = 0

	def Marshal(writer):
		writer.setUint16(self.sortL, 1)
		writer.setUint16(self.sortR, 2)
		writer.setUint8(self.op, 3)

	def Unmarshal( reader):
		self.sortL = reader.getUint16(1)
		self.sortR = reader.getUint16(2)
		self.op = reader.getUint8(3)
# message Resp2101
class Resp2101:
	def __init__(self):
		self.protoid = 2101
		self.list = []
		self.selfRank = RoseRankItem()
		self.status = 0
		self.op = 0

	def Marshal(writer):
		countlist = len(self.list)
		writer.setArray(countlist, 1)
		for i in range(countlist):
			writer.setMessage(0)
			self.list[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(2)
		self.selfRank.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.status, 3)
		writer.setUint8(self.op, 4)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = RoseRankItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.list.append(msg)
		reader.getMessage(2)
		self.selfRank.Unmarshal(reader)
		reader.endGetMessage()
		self.status = reader.getUint32(3)
		self.op = reader.getUint8(4)
# message VipGift
class VipGift:
	def __init__(self):
		self.protoid = 0
		self.level = 0
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.level, 1)
		writer.setUint8(self.status, 2)

	def Unmarshal( reader):
		self.level = reader.getUint32(1)
		self.status = reader.getUint8(2)
# message Req2102
class Req2102:
	def __init__(self):
		self.protoid = 2102
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp2102
class Resp2102:
	def __init__(self):
		self.protoid = 2102
		self.level = 0
		self.exp = 0
		self.gifts = []
		self.weekGift = VipGift()

	def Marshal(writer):
		writer.setUint32(self.level, 1)
		writer.setUint32(self.exp, 2)
		countgifts = len(self.gifts)
		writer.setArray(countgifts, 3)
		for i in range(countgifts):
			writer.setMessage(0)
			self.gifts[i].Marshal(writer)
			writer.endSetMessage()
		writer.setMessage(4)
		self.weekGift.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.level = reader.getUint32(1)
		self.exp = reader.getUint32(2)
		for i in range(reader.getArray(3)):
			msg = VipGift() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.gifts.append(msg)
		reader.getMessage(4)
		self.weekGift.Unmarshal(reader)
		reader.endGetMessage()
# message Req2103
class Req2103:
	def __init__(self):
		self.protoid = 2103
		self.op = 0
		self.level = 0

	def Marshal(writer):
		writer.setUint8(self.op, 1)
		writer.setUint32(self.level, 2)

	def Unmarshal( reader):
		self.op = reader.getUint8(1)
		self.level = reader.getUint32(2)
# message Resp2103
class Resp2103:
	def __init__(self):
		self.protoid = 2103
		self.status = 0
		self.op = 0
		self.level = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setUint8(self.op, 2)
		writer.setUint32(self.level, 3)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		self.op = reader.getUint8(2)
		self.level = reader.getUint32(3)
